﻿using HealthcareSystem.Domain;
using HealthcareSystem.Domain.BasicSettings.Element_classification;
using HealthcareSystem.Domain.BasicSettings.Diseasemanagement;
using HealthcareSystem.Domain.BasicSettings.Equipment;
using HealthcareSystem.Domain.BasicSettings.FormManagement;
using HealthcareSystem.Domain.BasicSettings.Metrics;
using HealthcareSystem.Domain.BasicSettings.Team;
using HealthcareSystem.Domain.ChronicDiseaseManagement;
using HealthcareSystem.Domain.Knowleges;
using Microsoft.EntityFrameworkCore;

namespace HealthcareSystem.Infrastructure
{
    public class MyDbContext : DbContext
    {
        public MyDbContext(DbContextOptions options) : base(options)
        {
        }

        /// <summary>
        /// 登录信息表
        /// </summary>
        public DbSet<Login> logins { get; set; }
        /// <summary>
        /// 签约
        /// </summary>
        public DbSet<ChronicSign> chronicSigns { get; set; }
        /// <summary>
        /// 慢病管理-健康宣教
        /// </summary>
        public DbSet<HealthEducation> healthEducation { get; set; }
        /// <summary>
        /// 知识管理-我的知识
        /// </summary>
        public DbSet<Knowledge> Knowledges { get; set; }
        /// 设备表
        /// </summary>
        public DbSet<EquipmentTable> equipmentTables { get; set; }
        /// <summary>
        /// 指标表
        /// </summary>
        public DbSet<Metricss> metrics { get; set; }
        /// <summary>
        /// 指标分类表
        /// </summary>
        public DbSet<MetricsClass> metricsClass { get; set; }
        /// <summary>
        /// 机构表（树形）
        /// </summary>
        public DbSet<Institution> institutions { get; set; }
        /// <summary>
        /// 团队表
        /// </summary>
        public DbSet<TeamTable> teamTables { get; set; }
        /// <summary>
        /// 慢病管理-健康报告表
        /// </summary>
        public DbSet<HealthReport> healthReports { get; set; }
        /// <summary>
        /// 居民基础档案表
        /// </summary>
        public DbSet<Record> Record { get; set; }
        /// <summary>
        /// 居民行为信息
        /// </summary>
        public DbSet<Physique> Physique { get; set; }
        /// <summary>
        /// 居民就诊表
        /// </summary>
        public DbSet<Medical> Medical { get; set; }
        /// <summary>
        /// 居民行为表
        /// </summary>
        public DbSet<Behavior> Behavior { get; set; }
        /// <summary>
        /// 元素管理
        /// </summary>
        public DbSet<Managementelements> Managementelements { get; set; }
        
        /// <summary>
        /// 元素类型
        /// </summary>
        public DbSet<Elementtype> elementtypes  { get; set; }
        /// <summary>
        /// 随访表
        /// </summary>
        public DbSet<Followup> followups { get; set; }
        /// <summary>
        /// 表单类别
        /// </summary>
        public DbSet<FormCategory> formCategories { get; set; }
        /// <summary>
        /// 健康元素
        /// </summary>
        public   DbSet<Healthelements> healthelements { get; set; }
        /// <summary>
        /// 其他元素
        /// </summary>
        public DbSet<Otherelements> otherelements { get; set; }

        /// <summary>
        /// 文本域
        /// </summary>
        public DbSet<Textfield> textfields { get; set; }

        /// <summary>
        /// 体征元素
        /// </summary>
        public DbSet<Typeofphysicalsigns> typeofphysicalsigns { get; set; }
        /// <summary>
        /// 病种管理
        /// </summary>
        public DbSet<Diseasemanage> diseasemanages { get; set; }

        /// <summary>
        /// 病种列表
        /// </summary>
        public DbSet<Listofdiseases> listofdiseases { get; set; }

        /// <summary>
        /// 慢病管理-慢病管理信息表
        /// </summary>
        public DbSet<ChronicList> chronicLists { get; set; }
        /// <summary>
        /// 诊断信息表
        /// </summary>
        public DbSet<DiagnosisInformation> diagnosisInformation { get; set; }
        /// <summary>
        /// 健康监测表
        /// </summary>
        public DbSet<HealthMonitoring> healthMonitorings { get; set; }
        /// <summary>
        /// 服务记录表
        /// </summary>
        public DbSet<ServiceRecord> serviceRecords { get; set; }
        /// <summary>
        /// 药物治疗表
        /// </summary>
        public DbSet<Drugtreatment> drugtreatments { get; set; }
        /// <summary>
        /// 饮食方案
        /// </summary>
        public DbSet<Dietplan> dietplan { get; set; }
        /// <summary>
        /// 随访管理表
        /// </summary>
        public DbSet<FollowupManagement> followupManagements { get; set; }



        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<HealthEducation>().ToTable("HealthEducation");
        }
    }
}
